package com.blockmeta.bbs.businesslibrary.util.navigation.impl;

import android.net.Uri;

import com.blockmeta.bbs.businesslibrary.arouter.RouterPath;
import com.blockmeta.bbs.businesslibrary.constant.Constant;
import com.blockmeta.bbs.businesslibrary.util.navigation.SimpleDeepLinkStrategy;

import java.util.HashMap;
import java.util.Map;

/**
 * @author AirThor
 * @date 2019/7/25.
 * "blockmeta://bbs/tutorial"
 */
public class BBSTutorialStrategy extends SimpleDeepLinkStrategy {
    @Override
    public Uri uriTransformer(Uri uri) {
        return Uri.parse("blockmeta://bbs"+ RouterPath.BBS_COLLEGE_DETAIL_ACTIVITY);
    }

    @Override
    public Map<String, String> navigationParams(Uri uri) {
        HashMap<String,String> params = new HashMap<>(2);
        params.put(Constant.ZERO,uri.getQueryParameter("tid"));
        return params;
    }
}
